<template>
  <div class="index">
    
    <div class="mt20">
        <div class="search-condition clearfix">
          产品型号：
           <Input  style="width:150px;"></Input>
          &nbsp;&nbsp;&nbsp;
          产品名称：
          <Select v-model="tradeType" style="width:100px">
              <Option v-for="item in tradeTypes" :value="item.value" :key="item.value">{{ item.label }}</Option>
          </Select>
          &nbsp;&nbsp;&nbsp;
          
          <Button type="primary">查询</Button> 
         
        </div>
        
        <div class="mt20">
          <Table stripe :columns="columns1" :data="data1">
            <template slot-scope="{ row, index }" slot="action">
              <Icon type="md-cart c4" size="20" title="购买" @click="gotoDetail(row)"/>
            </template>
          </Table>
        </div>
    </div>
  
    <div class="page mt20">
      <Page :total="100" show-sizer />
    </div> 
  
  </div>
</template>

<script>
  export default {
    data () {
      return{
        position:[
          {title: '代理商管理', link:'/admin/agent'},
          {title: '产品管理'}
        ],
        tradeType: '1',
        tradeTypes:[
          {label: '类型1', value:'1'},
          {laleb: '类型2', value: '2'}
        ],
        columns1: [
          {title: '产品名称', key: 'address'},
          { title: '产品型号', key: 'address'},
          { title: '技术参数', key: 'address'},
          { title: '数量', key: 'address'},
          { title: '全国统一价', key: 'address'},
          { title: 'OEM代理商价', key: 'address'},
          { title: '保证金支付比例', key: 'address'},
          { title: '操作', slot: 'action', width: 60, align: 'center'},
         ],
         data1:[
           {
             id: '103232',
             'address': 'fsdfsdfdsf'
           },
           {
             id: '103232',
             'address': 'fsdfsdfdsf'
           },
           {
             id: '103232',
             'address': 'fsdfsdfdsf'
           },
           
         ]
      }
    },
    mounted () {
      this.$store.commit('UPDATE_POSITION', this.position)
    },
    methods:{
      gotoDetail (item) {
        this.$router.push('productBuy?id=' + item.id)
      }
    }
  }
</script>

<style lang="less" scoped>

  </style>
